What is Git and why should I learn it?

What are the benefits to it?

  • Exposure If someone wants your code, they can just clone it from your Github.

  • Help each other Let’s say I want to advance someone else’s code. I can fork a feature or fix bugs for them. Github will automatically notify the author and they can use keep or reject edits.

Why can’t I copy and paste in a word file? Or just send people my R code?

  • Because it’s sloppy, nobody will hire you, and nobody likes having fifteen files called Version 1, version 2 final Version, The actual final version.

  • We develop new materials to make slightly easier, for example:why do we use gmail instead of writing letters and putting money on the letter and sending each other. Technology advances and people who utilize it have more time for fun. That’s right, science = fun.

What is Github?

How do I get GitHub? Is it easy?

  • Google Github.com and go to their website and make an account, while you are there download the software client for it.

  • Good Job. Though, I want to mention here that there are MUCH better clients for Git AND many ways to utilize Git.

Step 1. Create a repository.

Look at that, I added a summary and description, I’m already better than half the packages on github

Look at that, I added a summary and description, I’m already better than half the packages on github

Once you have published, the whole world can see your repository!

Branches

Alright, so Let’s talk about branches * These are the aspects for collaboration * Instead of always working in one specific master file and messing that up, we can work in branches and discuss whether or not we want changes.

Don’t tempt me Ben Stiller, I’ll do it

Don’t tempt me Ben Stiller, I’ll do it

This is way too meta
* This is an example of something you want to discuss before putting it in the final version

Green plus signs indicate something was added, The orange circle indicate something was edited – you can drill down to see more

Green plus signs indicate something was added, The orange circle indicate something was edited – you can drill down to see more

The red lines indicate removal of a line, while green lines indicate addition.

The red lines indicate removal of a line, while green lines indicate addition.

Merging*

GitHub will tell you if you did it right.

I’d recommend deleting useless branches that have been incorporated because they will just mess you up in the future, plus it’s redundant.

Now you’ve made your first repository and you’ve learned how to create branches!

Cloning

Forking

Take home message

Good on you, it’s kinda difficult to learn but the best way to learn is just by doing. I’d recommend starting by just putting a small project on Github and editing a small change to see what happens.

Let’s honor this moment by adding gifs!

Celebrate good times have fun!

celebrate
celebrate
celebrate
celebrate